package com.rongmei.jdsync.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.Column;
import java.math.BigDecimal;

/**
 * SKU数据传输对象
 *
 * @author dongjun
 */
@Data
@Schema(description = "SKU数据")
@JsonIgnoreProperties(ignoreUnknown = true)
public class SkuDataDto {
    @JsonProperty("cost_price")
    @Schema(description = "成本价")
    private BigDecimal costPrice;

    @JsonProperty("discount_price")
    @Schema(description = "折扣价")
    private String discountPrice;

    @JsonProperty("jd_sku_id")
    @Schema(description = "京东SKU ID")
    private Long jdSkuId;

    @JsonProperty("jd_specials")
    @Schema(description = "京东特殊标记")
    private Integer jdSpecials;

    @JsonProperty("makeups_company_price")
    @Schema(description = "组合公司价")
    private BigDecimal makeupsCompanyPrice;

    @JsonProperty("makeups_pioneer_price")
    @Schema(description = "组合先锋价")
    private BigDecimal makeupsPioneerPrice;

    @JsonProperty("market_price")
    @Schema(description = "市场价")
    private BigDecimal marketPrice;

    @JsonProperty("member_price")
    @Schema(description = "会员价")
    private BigDecimal memberPrice;

    @JsonProperty("pre_silver_bean")
    @Schema(description = "预计银豆")
    private Integer preSilverBean;

    @Schema(description = "价格")
    private BigDecimal price;

    @JsonProperty("site_id")
    @Schema(description = "站点ID")
    private Integer siteId;

//    @JsonProperty("sku_detail")
//    @Schema(description = "SKU详细信息")
//    private List<SkuDetailDto> skuDetail;

    @JsonProperty("goods_state")
    @Schema(description = "商品状态：1上架0下架")
    private Integer goodsState;

    @JsonProperty("sku_id")
    @Schema(description = "SKU ID")
    private Long skuId;

    @JsonProperty("sku_image")
    @Schema(description = "SKU图片")
    private String skuImage;

    @JsonProperty("sku_images")
    @Schema(description = "SKU图片列表")
    private String skuImages;

    @JsonProperty("sku_name")
    @Schema(description = "SKU名称")
    private String skuName;

    @JsonProperty("sku_no")
    @Schema(description = "SKU编号")
    private String skuNo;

    @JsonProperty("sku_spec_format")
    @Schema(description = "SKU规格格式")
    private String skuSpecFormat;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "来源")
    private Integer source;

    @JsonProperty("spec_name")
    @Schema(description = "规格名称")
    private String specName;

    @Schema(description = "库存")
    private Integer stock;

    @JsonProperty("vip_price")
    @Schema(description = "VIP价格")
    private BigDecimal vipPrice;

    @Schema(description = "体积")
    private String volume;

    @Schema(description = "重量")
    private String weight;

//    // 处理额外的属性
//    private Map<String, Object> additionalProperties = new HashMap<>();
//
//    @JsonAnyGetter
//    public Map<String, Object> getAdditionalProperties() {
//        return additionalProperties;
//    }
//
//    @JsonAnySetter
//    public void setAdditionalProperty(String name, Object value) {
//        additionalProperties.put(name, value);
//    }
}
